package cn.ljy.uem.model;

import cn.ljy.authority.model.SysUser;
import cn.ljy.common.model.BaseModel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;


/**
 * @description 项目组
 * @author 廖振豪
 * @date 2023-1-18
 */
@ApiModel(value="项目组")
@Data
@NoArgsConstructor
public class ProjectTeam extends BaseModel {
    @ApiModelProperty(value="UUID")
    private String id;

    @ApiModelProperty(value = "项目外键")
    @NotNull(message = "项目外键不能为空")
    private String projectId;

    @ApiModelProperty(value = "小组名称")
    @NotBlank(message = "小组名称不能为空")
    @Length(min = 1, max = 30, message = "名称长度必须在 {min} - {max} 之间")
    private String name;;//项目小组

    @ApiModelProperty(value = "小组工作描述")
    @NotBlank(message = "小组工作描述")
    @Length(min = 1, max = 255, message = "名称长度必须在 {min} - {max} 之间")
    private String job;//项目描述

    private Date createTime;//创建时间

    private Date updateTime;//修改时间

//   非数据库字段
    private Project project;//项目-项目组外键 project_id
}
